#include "widget.h"
#include "ui_widget.h"
#include <QListView>
#include <string>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QStringList strList;
    strList << "item1" << "item2" << "item3" << "item4"
            << "item1" << "item2" << "item3" << "item4"
            << "item1" << "item2" << "item3" << "item4"
            << "item1" << "item2" << "item3" << "item4";

    ui->comboBox->addItems(strList);
    ui->comboBox->setView(new QListView(this));
    ui->comboBox->setEditable(true);
}

Widget::~Widget()
{
    delete ui;
}
